CygNet Studio > Scripting in CygNet Studio > Scripting Examples > Closing a Remote View

Closing a Remote View

Using The View’s FormFind method retrieve a handle to another open screen using its (FormCode) property. The following example gets a handle to the "MyForm" screen, then uses its TheView object, and remotely closes it. The On Error statement ensures that the remote screen is only closed if the FormFind method was able to return a valid handle.

Set FormObject = TheView.FormFind("MyForm")

On Error Resume Next

FormObject.TheView.Cancel

On Error GoTo 0


Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.